<template>
  <div class="home">
    <!-- 筛选 -->
    <div class="search_content">
      <van-search
        v-model="requestParams.codeNo"
        placeholder="请输入车架号或者车牌号"
        shape="round"
        @search="initData"
        @clear="clearSearch"
      />
      <div class="search_item">
        <van-dropdown-menu :close-on-click-outside="false">
          <van-dropdown-item title="任务状态" ref="statusRef">
            <div class="searchbox">
              <div class="title">任务一级状态</div>
              <div class="insureList">
                <div
                  class="insure_item"
                  :class="item.check ? 'active' : ''"
                  v-for="(item, index) in oneBillStatusList"
                  :key="index"
                  @click="handleSearchSelect(index, 'oneBillStatusList')"
                >
                  {{ item.name }}
                </div>
              </div>
              <div class="title">任务二级状态</div>
              <div class="insureList">
                <div
                  class="insure_item"
                  :class="item.check ? 'active' : ''"
                  v-for="(item, index) in twoBillStatusList"
                  :key="index"
                  @click="handleSearchSelect(index, 'twoBillStatusList')"
                >
                  {{ item.name }}
                </div>
              </div>

              <div class="insureBtn">
                <van-button
                  size="small"
                  type="warning"
                  class="resetBtn"
                  @click="handleSelectReset('statusRef')"
                >
                  重置
                </van-button>
                <van-button
                  size="small"
                  type="info"
                  class="confirmBtn"
                  @click="onConfirm('statusRef')"
                >
                  确认
                </van-button>
              </div>
            </div>
          </van-dropdown-item>

          <van-dropdown-item title="任务类型" ref="taskTypeRef">
            <div class="searchbox">
              <div class="insureList">
                <div
                  class="insure_item"
                  :class="item.check ? 'active' : ''"
                  v-for="(item, index) in taskTypeList"
                  :key="index"
                  @click="handleSearchSelect(index, 'taskTypeList')"
                >
                  {{ item.name }}
                </div>
              </div>
              <div class="insureBtn">
                <van-button
                  size="small"
                  type="warning"
                  class="resetBtn"
                  @click="handleSelectReset('taskTypeRef')"
                >
                  重置
                </van-button>
                <van-button
                  size="small"
                  type="info"
                  class="confirmBtn"
                  @click="onConfirm('taskTypeRef')"
                >
                  确认
                </van-button>
              </div>
            </div>
          </van-dropdown-item>

          <van-dropdown-item title="跟进人员" ref="followRef">
            <div class="searchbox">
              <van-field
                v-model="requestParams.fixCenterName"
                name="维修中心"
                label="维修中心"
                input-align="right"
                placeholder="请选择"
                readonly
                right-icon="arrow"
                @click="handleSelect('fixCenterId', 'fixCenterName')"
              />
              <van-field
                v-model="requestParams.serverPsnName"
                name="跟进人"
                label="跟进人"
                input-align="right"
                placeholder="请选择"
                readonly
                right-icon="arrow"
                @click="handleSelect('serverPsnId', 'serverPsnName')"
              />
              <div class="insureBtn">
                <van-button
                  size="small"
                  type="warning"
                  class="resetBtn"
                  @click="handleSelectReset('followRef')"
                >
                  重置
                </van-button>
                <van-button
                  size="small"
                  type="info"
                  class="confirmBtn"
                  @click="onConfirm('followRef')"
                >
                  确认
                </van-button>
              </div>
            </div>
          </van-dropdown-item>

          <van-dropdown-item title="筛选" ref="filterRef">
            <div class="searchbox timebox">
              <van-field
                v-model="requestParams.fixCenterName"
                name="维修中心"
                label="维修中心"
                input-align="right"
                placeholder="请选择"
                readonly
                right-icon="arrow"
                @click="handleSelect('fixCenterId', 'fixCenterName')"
              />
              <van-field
                v-model="requestParams.outUser"
                name="服务顾问"
                label="服务顾问"
                input-align="right"
                placeholder="请选择"
                readonly
                right-icon="arrow"
                @click="handleSelect('outUser')"
              />
              <div class="title">任务时间</div>
              <div class="flex">
                <van-field
                  class="time_item"
                  v-model="requestParams.taskStartCreateTime"
                  label=""
                  :placeholder="'开始时间'"
                  input-align="right"
                  readonly
                  @click="handleSelectTime('taskStartCreateTime')"
                />
                -
                <van-field
                  class="time_item"
                  v-model="requestParams.taskEndCreateTime"
                  label=""
                  :placeholder="'结束时间'"
                  input-align="right"
                  readonly
                  @click="handleSelectTime('taskEndCreateTime')"
                />
              </div>

              <div class="title">是否逾期任务</div>
              <div class="insureList">
                <div
                  class="insure_item"
                  :class="index == delayIndex ? 'active' : ''"
                  v-for="(item, index) in delayList"
                  :key="index"
                  @click="
                    handleIsSelect(index, 'delayIndex', 'delayList', 'isExceed')
                  "
                >
                  {{ item.name }}
                </div>
              </div>
              <div class="title">是否生成预约单</div>
              <div class="insureList">
                <div
                  class="insure_item"
                  :class="index == creatIndex ? 'active' : ''"
                  v-for="(item, index) in creatList"
                  :key="index"
                  @click="
                    handleIsSelect(
                      index,
                      'creatIndex',
                      'creatList',
                      'isGenRepBook'
                    )
                  "
                >
                  {{ item.name }}
                </div>
              </div>
              <!-- <div class="title">是否战败</div>
              <div class="insureList">
                <div
                  class="insure_item"
                  :class="index == defeatIndex ? 'active' : ''"
                  v-for="(item, index) in defeatList"
                  :key="index"
                  @click="handleIsSelect(index, 'defeatIndex','defeatList','isExceed')"
                >
                  {{ item.name }}
                </div>
              </div> -->
              <div class="insureBtn">
                <van-button
                  size="small"
                  type="warning"
                  class="resetBtn"
                  @click="handleAccidentReset()"
                >
                  重置
                </van-button>
                <van-button
                  size="small"
                  type="info"
                  class="confirmBtn"
                  @click="onConfirm('filterRef')"
                >
                  确认
                </van-button>
              </div>
            </div>
          </van-dropdown-item>
        </van-dropdown-menu>

        <!-- 服务顾问下拉 -->
        <van-popup v-model="showSelectPicker" position="bottom">
          <van-picker
            show-toolbar
            :columns="columns"
            @confirm="handleSelectConfirm"
            @cancel="showSelectPicker = false"
            value-key="name"
          />
        </van-popup>
        <!-- 时间选择 -->
        <van-popup v-model="showPickerDate" position="bottom">
          <van-datetime-picker
            v-model="currentDate"
            type="date"
            @cancel="onCancelDate"
            @confirm="onConfirmDate"
            :formatter="formatter"
          />
        </van-popup>
      </div>
    </div>

    <!-- 列表 -->
    <van-pull-refresh v-model="refreshing" @refresh="onRefresh">
      <van-list
        v-model="loading"
        :finished="finished"
        finished-text="没有更多了"
        @load="loadData"
        v-if="recordList && recordList.length != 0"
      >
        <div class="orderList">
          <div
            class="orderbox"
            v-for="(item, index) in recordList"
            :key="index"
          >
            <div class="flex">
              <div class="taskCheck" v-if="showTransmitFlag">
                <van-checkbox
                  v-model="item.check"
                  shape="square"
                  icon-size="15px"
                ></van-checkbox>
              </div>
              <div class="orderItem">
                <div class="orderItem_box">
                  <div class="orderItem_header" @click="getDetail(item)">
                    <div class="orderItem_lt">
                      <div class="carNo">{{ item.taskName }}</div>
                      <div class="carStatus">{{ item.oneBillStatus }}</div>
                    </div>
                    <div class="orderItem_rt">
                      跟进人：{{ item.taskPerson }}
                    </div>
                  </div>
                  <div class="vinNo" v-if="item.vinCode">
                    {{ item.vinCode }}
                  </div>
                </div>
                <div class="orderItem_content" @click="getDetail(item)">
                  <div class="orderItem_data">
                    <div class="order_label">客户名称</div>
                    <div class="txt">{{ item.customerName }}</div>
                  </div>
                  <div class="orderItem_data">
                    <div class="order_label">所属服务顾问</div>
                    <div class="txt">{{ item.serverName }}</div>
                  </div>
                  <div class="orderItem_data">
                    <div class="order_label">车型</div>
                    <div class="txt">{{ item.carModel }}</div>
                  </div>
                  <div class="orderItem_data">
                    <div class="order_label">行驶里程数</div>
                    <div class="txt">{{ item.carMiles }}km</div>
                  </div>
                  <div class="orderItem_data time">
                    <div class="order_label">最后进场时间</div>
                    <div class="txt">{{ item.dateIn }}</div>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
      </van-list>
      <van-empty class="noContent" description="暂无数据" v-else />
    </van-pull-refresh>

    <van-popup v-model="updateSelectVisible" position="bottom">
      <van-picker
        show-toolbar
        :columns="updateColumns"
        @confirm="handleUpdateSelectConfirm"
        @cancel="updateSelectVisible = false"
        value-key="name"
      />
    </van-popup>

    <div class="loading" v-if="loading">
      <van-loading size="30px" class="loadbox" color="#fff" text-color="#fff">
        加载中...
      </van-loading>
      <div class="mask"></div>
    </div>
  </div>
</template>

<script>
import Vue from "vue";
import {
  Search,
  DropdownMenu,
  DropdownItem,
  Empty,
  Dialog,
  Notify,
  Loading,
} from "vant";
import taskApi from "@/api/taskApi";
import commonApi from "@/api/commonApi";
import { getCookies } from "@/utils/util.js";

export default {
  name: "repairOrder",
  components: {
    Search,
    DropdownMenu,
    DropdownItem,
    Empty,
    Dialog,
    Notify,
    Loading,
  },
  data() {
    return {
      value: "",
      carCouponList: [
        { name: "是", code: 1, check: false },
        { name: "否", code: 0, check: false },
      ],
      taskTypeList: [],
      statusList: [
        { name: "已处理", code: 1, check: false },
        { name: "未处理", code: 2, check: false },
      ],

      recordList: [
        // {
        //   billId: "1", //单据ID
        //   carNo: "闽D66666", //车牌号
        //   taskName: "闽D66666定期保养招揽", //任务名称
        //   taskPerson: "张三", //跟进人
        //   oneBillStatus: "未处理", //任务一级状态
        //   twoBillStatus: "未处理", //任务二级状态
        //   customerName: "李四", //客户名称
        //   mobile1: "", //手机1
        //   mobile12: "", //手机2
        //   serverName: "王武", //所属服务顾问
        //   carModel: "CT5 2,0T", //车型
        //   carMiles: "8888", //公里数
        //   dateIn: "2023-06-25", //最近进场日期
        // },
      ],
      columns: [],
      showSelectPicker: false,
      requestParams: {
        codeNo: "", //车架号或者车牌号，String，必填
        pageNo: 1, //当前页数，默认从1开始，每页显示十条，int，不能为空或者小于1
        oneBillStatus: "", //任务一级状态
        twoBillStatus: "", //任务二级状态
        taskTypeId: "", //任务类型ID值
        taskPersonId: "", //任务跟进人，ID值
        fixCenterId: "",
        fixCenterName: "",
        serverPsnId: "",
        serverPsnName: "",
        taskStartCreateTime: "",
        taskEndCreateTime: "",
        isExceed: "", //是否逾期，1为是，0为否
        isGenRepBook: "", //是否生成维修预约单
        billId: "", //本身单据ID，此为详细界面使用
        carId: "", //车辆ID，此为详细界面使用
        userId: getCookies("userId"), //用户ID，必填，String
      },
      carCouponIndex: null,

      repairCenterList: [
        { name: "厦门路虎", code: 1 },
        { name: "厦门捷豹", code: 2 },
      ],
      serviceList: [
        { name: "黄某某", code: 1 },
        { name: "张某某", code: 2 },
      ],
      delayList: [
        { name: "是", billId: 1, check: false },
        { name: "否", billId: 0, check: false },
      ],
      creatList: [
        { name: "是", billId: 1, check: false },
        { name: "否", billId: 0, check: false },
      ],
      defeatList: [
        { name: "是", billId: 1, check: false },
        { name: "否", billId: 0, check: false },
      ],

      delayIndex: null,
      creatIndex: null,
      defeatIndex: null,
      showTransmitFlag: false,
      timeField: "",
      showPickerDate: false,
      currentDate: new Date(),
      list: [],
      // 分页参数
      loading: false,
      finished: false,
      refreshing: false,
      isLoadData: false,

      field: "",
      fieldName: "",
      fixCenterList: [],
      oneBillStatusList: [],
      twoBillStatusList: [],
      // 变更顾问字段
      updateServiceVisible: false,
      updateSelectVisible: false,

      updateServiceData: {
        fixCenterId: "",
        fixCenterName: "",
        followPersonID: "",
        followPersonName: "",
        billIds: "",
      },
      updateDataField: "",
      updateDataChirldenField: "",
      updateDataChirldenFieldName: "",
      updateColumns: [],
    };
  },

  mounted() {
    this.getTaskType();
    this.getOneBillStatusList();
    this.getTwoBillStatusList();
    this.getMainFixCenter();
    this.initData();
  },

  methods: {
    // 初始化列表
    initData() {
      this.requestParams.pageNo = 1;
      this.loadData();
    },
    // 获取列表
    loadData() {
      if (this.isLoadData) return;
      this.isLoadData = true;
      this.loading = true;
      this.finished = false;
      // console.log(this.isLoadData);
      taskApi.getCustomerTaskList({ ...this.requestParams }).then((res) => {
        if (res.data && res.data.length) {
          res.data.forEach((item) => {
            item.check = false;
          });
        }
        if (this.requestParams.pageNo == 1) {
          this.recordList = res.data || [];
          this.$emit("getDetail", res.data[0]);
        } else {
          this.recordList = this.recordList.concat(res.data || []);
        }
        this.requestParams.pageNo += 1;

        if (res.data.length < 10) {
          this.finished = true;
          this.isLoadData = true;
        }
        this.isLoadData = false;
        this.loading = false;
      });
    },
    // 下拉刷新
    onRefresh() {
      // 清空列表数据
      this.recordList = [];
      this.finished = false;
      // 重新加载数据
      // 将 loading 设置为 true，表示处于加载状态
      this.loading = true;
      this.refreshing = false;
      this.initData();
    },
    // 获取任务类型
    getTaskType() {
      commonApi
        .getTaskType({ userId: this.requestParams.userId })
        .then((res) => {
          this.taskTypeList = this.formatCheckData(res.data);
        });
    },
    // 获取维修中心
    getMainFixCenter() {
      commonApi
        .getMainFixCenter({
          userId: this.requestParams.userId,
          type:'fixCenter'
        })
        .then((res) => {
          this.fixCenterList = res.data;
        });
    },
    // 获取服务顾问
    getEmpPerson() {
      commonApi
        .getEmpPerson({
          fixCenterId: this.updateSelectVisible
            ? this.updateServiceData.fixCenterId
            : this.requestParams.fixCenterId,
          userId: this.requestParams.userId,
        })
        .then((res) => {
          this.serviceList = res.data;
        });
    },
    // 获取保险一级状态
    getOneBillStatusList() {
      commonApi
        .getEnums({ key: "oneBillStatus", userId: this.requestParams.userId })
        .then((res) => {
          if (res.data) {
            this.oneBillStatusList = this.formatCheckData(res.data);
          }
        });
    },
    // 获取保险一级状态
    getTwoBillStatusList() {
      commonApi
        .getEnums({ key: "twoBillStatus", userId: this.requestParams.userId })
        .then((res) => {
          if (res.data) {
            this.twoBillStatusList = this.formatCheckData(res.data);
          }
        });
    },

    // 格式化多选数据
    formatCheckData(data) {
      data.forEach((item) => {
        item.check = false;
      });
      return data;
    },

    // 选择下拉
    handleSelect(field, fieldName) {
      this.showSelectPicker = true;
      if (field == "carCoupon") {
        this.columns = [
          { name: "是", value: 1 },
          { name: "否", value: 2 },
        ];
      } else if (field == "serverPsnId") {
        this.columns = this.serviceList;
      } else if (field == "fixCenterId") {
        this.columns = this.fixCenterList;
      }
      this.field = field;
      this.fieldName = fieldName;
    },

    // 筛选是否
    handleCarSelect(index) {
      this.carCouponIndex = index;
    },
    // 筛选重置
    handleSelectReset(ref) {
      this.requestParams.taskPersonId = "";
      this.requestParams.isGenRepBook = "";
      if (ref == "statusRef") {
        this.oneBillStatusList.forEach((item) => {
          item.check = false;
        });
        this.twoBillStatusList.forEach((item) => {
          item.check = false;
        });
        this.requestParams.oneBillStatus = "";
        this.requestParams.twoBillStatus = "";
      }
      if (ref == "followRef") {
        this.requestParams.fixCenterId = "";
        this.requestParams.fixCenterName = "";
        this.requestParams.serverPsnId = "";
        this.requestParams.serverPsnName = "";
        this.serviceList = [];
      }
      if (ref == "taskTypeRef") {
        this.taskTypeList.forEach((item) => {
          item.check = false;
        });
        this.requestParams.taskTypeId = "";
      }
    },

    // 选择下拉确认
    handleSelectConfirm(value, index) {
      this.requestParams[this.field] = value.billId;
      this.requestParams[this.fieldName] = value.name;
      if (this.field == "fixCenterId") {
        this.getEmpPerson();
      }
      this.showSelectPicker = false;
    },

    // 所属服务顾问重置
    handleReset() {
      this.requestParams.fixCenterId = "";
      this.requestParams.outUser = "";
    },

    //时间重置
    handleAccidentReset() {
      this.creatIndex = null;
      this.defeatIndex = null;
      this.delayIndex = null;
      this.requestParams.isExceed = "";
      this.requestParams.isGenRepBook = "";
      this.requestParams.taskStartCreateTime = "";
      this.requestParams.taskEndCreateTime = "";
    },
    onConfirm(ref) {
      this.$refs[ref].toggle();
      if (ref == "taskTypeRef") {
        let checkList = [];
        this.taskTypeList.forEach((el) => {
          if (el.check) {
            checkList.push(el.billId);
          }
          this.requestParams.taskTypeId = checkList.join(";");
        });
      }
      if (ref == "statusRef") {
        let checkList = [];
        this.oneBillStatusList.forEach((el) => {
          if (el.check) {
            checkList.push(el.value);
          }
          this.requestParams.oneBillStatus = checkList.join(";");
        });
        let checkList2 = [];
        this.oneBillStatusList.forEach((el) => {
          if (el.check) {
            checkList2.push(el.value);
          }
          this.requestParams.twoBillStatus = checkList.join(";");
        });
      }
      if (ref == "filterRef") {
      }
      this.initData();
    },
    // 时间确认
    onConfirmDate() {
      this.requestParams[
        this.timeField
      ] = `${this.value1}-${this.value2}-${this.value3}`; // 字符串拼接 结果入2020-07-03
      this.onCancelDate();
    },
    onCancelDate() {
      this.showPickerDate = false;
    },

    // 日期组件自定义格式
    formatter(type, value) {
      if (type === "year") {
        this.value1 = value; // 可以拿到当前点击的数值
        return `${value}年`;
      } else if (type === "month") {
        this.value2 = value;
        return `${value}月`;
      }
      this.value3 = value;
      return `${value}日`;
    },

    // 获取list名称
    getFieldName(list, key, val) {
      if (list && list.length > 0) {
        let obj = list.filter((item) => {
          return item[key] == val;
        });
        if (obj.length > 0) {
          return obj[0].name;
        }
      }
      return null;
    },

    // 详情
    goDetail(data) {
      this.$router.push({
        path: "/taskCenterDetail",
        query: { billId: data.billId },
      });
    },
    // 顶部筛选选择数据
    handleSearchSelect(index, listKey) {
      console.log(listKey);

      this[listKey][index].check = !this[listKey][index].check;
      console.log(this[listKey]);
    },
    // 重置任务状态
    handleSearchReset() {
      this.taskTypeList.forEach((item) => {
        item.check = false;
      });
    },

    // 是否数据选择
    handleIsSelect(index, key, list, field) {
      this[key] = index;
      this.requestParams[field] = this[list][index].billId;
    },
    // 任务转交展示
    handleShowTransmit() {
      this.showTransmitFlag = true;
    },
    // 确认转交
    handleTransmitSubmit() {
      let ids = [];
      for (let i = 0; i < this.recordList.length; i++) {
        let item = this.recordList[i];
        if (item.check) {
          ids.push(item.billId);
        }
      }
      if (ids.length == 0) {
        Notify({ type: "danger", message: "请至少选择一个任务" });
        return;
      }
      this.updateServiceData.billIds = ids.join(";");
      this.updateServiceVisible = true;
    },
    // 取消
    handleTransmitCancel() {
      this.showTransmitFlag = false;
    },
    // 时间筛选
    handleSelectTime(field) {
      this.timeField = field;
      this.showPickerDate = true;
    },
    // 弹窗下拉
    handleUpdateSelect(data, field, fieldName) {
      this.updateSelectVisible = true;
      this.updateDataField = data;
      this.updateDataChirldenField = field;
      this.updateDataChirldenFieldName = fieldName;
      if (field == "fixCenterId") {
        this.updateColumns = this.fixCenterList;
      }
      if (field == "followPersonID") {
        this.updateColumns = this.serviceList;
      }
    },
    // 更新下拉确认
    handleUpdateSelectConfirm(value) {
      this[this.updateDataField][this.updateDataChirldenFieldName] = value.name;
      this[this.updateDataField][this.updateDataChirldenField] = value.billId;
      if (this.updateDataField == "updateServiceData") {
        this.getEmpPerson();
      }
      this.updateSelectVisible = false;
    },

    // 清除弹窗信息
    clearDialogData() {
      this.updateServiceData = {
        fixCenterId: "",
        fixCenterName: "",
        followPersonID: "",
        followPersonName: "",
        billIds: "",
      };
    },
    beforeCloseUpdateTel(action, done) {
      if (action === "confirm") {
        return done(false);
      } else {
        return done();
      }
    },
    clearSearch() {
      this.requestParams.codeNo = "";
      this.initData();
    },
    getDetail(data) {
      this.$emit("getDetail", data);
    },
  },
};
</script>
<style>
html,
body {
  font-size: 50px !important;
  background: #fff;
  box-sizing: border-box;
}
</style>
<style lang="less" scoped="">
body {
}
.home {
  background: #f3f3f3;
  height: 100vh;
  overflow-y: auto;
}
.search_content {
  // position: fixed;
  // top: 0;
  // left: 0;
  // width: 100%;
  // z-index: 2;
  width: 7.5rem;
}
.timebox {
  /deep/.van-cell::after {
    border: none;
  }
  .time_item {
    /deep/.van-field__control--right {
      border: 1px solid #d1d1d1;
      padding: 0.1rem 0;
      text-align: center;
      border-radius: 3px;
    }
  }
}
.searchbox {
  padding: 0.3rem;
  .title {
    font-size: 0.3rem;
    font-weight: bold;
    color: #333;
    margin-bottom: 0.2rem;
    padding-top: 0.2rem;
  }
  .insureList {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    flex-wrap: wrap;
    .insure_item {
      text-align: center;
      padding: 0.15rem 0rem;
      width: 30%;
      box-sizing: border-box;
      font-size: 0.28rem;
      border-radius: 3px;
      color: #666;
      margin-bottom: 0.2rem;
      margin-right: 5%;
      white-space: nowrap;
      text-overflow: ellipsis;
      overflow: hidden;
      box-shadow: 0px 0px 2px 0px rgba(0, 0, 0, 0.5);
      &:nth-child(3n) {
        margin-right: 0;
      }
      &.active {
        box-shadow: 0px 0px 3px 0px #f65e07;
        color: #f65e07;
      }
    }
  }
  .insureBtn {
    display: flex;
    justify-content: flex-end;
    margin-top: 0.4rem;
    .resetBtn {
      padding: 0 0.4rem;
      margin-right: 0.2rem;
    }
    .confirmBtn {
      padding: 0 0.4rem;
    }
  }
}

.orderList {
  padding-top: 0rem;
  margin: 0.2rem;
  overflow: auto;
  width: 7.5rem;
  // height: 1000px;
  .orderbox {
    width: 100%;
  }
  // padding-bottom: 1.5rem;
  .taskCheck {
    margin-right: 0.1rem;
  }
  .orderItem {
    padding: 0.3rem;
    background: #fff;
    border-radius: 10px;
    width: 100%;
    margin-bottom: 0.3rem;
    .orderItem_box {
      margin-bottom: 0.3rem;
      padding-bottom: 0.2rem;
      border-bottom: 1px solid #f6f6f6;
      position: relative;
      .vinNo {
        font-size: 0.28rem;
        color: #333;
        margin-top: 0.2rem;
      }
    }
    .orderItem_header {
      display: flex;
      justify-content: space-between;
      align-items: center;

      .orderItem_lt {
        .carNo {
          font-size: 0.3rem;
          color: #333;
          margin-right: 0.2rem;
          font-weight: bold;
        }

        .carStatus {
          background: #35bc04;
          color: #fff;
          border-radius: 4px;
          padding: 0.1rem 0.2rem;
          font-size: 0.24rem;
          text-align: center;
          width: 1rem;
          margin-top: 0.1rem;
        }
      }
      .orderItem_rt {
        display: flex;
        align-items: center;
        align-self: center;
        justify-content: flex-start;
        color: #666;
        font-size: 0.28rem;

        .txt {
          font-size: 0.28rem;
          color: #161616;
        }
        .icon-tel {
          color: #fff;
          background: #35bc04;
          font-size: 0.32rem;
          padding: 0.1rem;
          border-radius: 50%;
          margin-right: 0.2rem;
        }
        .icon-wx {
          color: #409eff;
          font-size: 0.65rem;
        }
      }
    }
    .orderItem_content {
      display: flex;
      justify-content: flex-start;
      flex-wrap: wrap;
      align-items: center;
      .orderItem_data {
        display: flex;
        justify-content: flex-start;
        align-items: center;
        width: 50%;
        margin-bottom: 0.2rem;
        font-size: 0.28rem;
        box-sizing: content-box;
        color: #333;
        .order_label {
          font-size: 0.28rem;
          color: #333;
          width: 1.8rem;
        }
        .txt {
          font-size: 0.28rem;
          color: #666;
          white-space: nowrap;
          overflow: hidden;
          text-overflow: ellipsis;
        }
        &.time {
          width: 100%;
        }
      }
    }
    .orderItem_file {
      background: #ebebeb;
      color: #333;
      border-radius: 5px;
      padding: 0.2rem 0;
      text-align: center;
      width: 100%;
      font-size: 0.28rem;
      display: flex;
      align-items: center;
      justify-content: center;
      .file_item {
        width: 33.33%;
        border-right: 1px solid #ccc;
        .icon-tel {
          font-size: 0.34rem;
          color: #35bc04;
          margin-right: 0.1rem;
        }
        .icon-mileage {
          font-size: 0.4rem;
          color: #409eff;
          margin-right: 0.1rem;
          position: relative;
          top: 0.04rem;
        }
        .icon-gw {
          font-size: 0.4rem;
          color: #409eff;
          margin-right: 0.1rem;
          position: relative;
          top: 0.04rem;
        }
        &:last-child {
          border: none;
        }
      }
    }
  }
}
.addBtn {
  position: fixed;
  bottom: 0.8rem;
  width: 100%;
  z-index: 1;
  .footerBtn {
    width: 2.8rem;
    margin: auto;
    text-align: center;
    font-size: 0.28rem;
    padding: 0.25rem 0rem;
    border-radius: 50px;
  }
  .orderItem_filebox {
    margin: auto;
    background: #409eff;
    color: #fff;
  }
  .comfirmBtn {
    background: #409eff;
    color: #fff;
  }
  .cancelBtn {
    border: 1px solid #ccc;
    color: #999;
    background: #fff;
  }
}
.noContent {
  margin-top: 2rem;
}
</style>
